package vn.vfriends.soffice.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.soffice.model.Dept;
import vn.vfriends.soffice.facade.DeptFacade;
import vn.vfriends.soffice.service.DeptService;

/**
 *
 * @author chaungoctuan@gmail.com
 */
public class DeptServiceImpl implements DeptService{

    @Inject private DeptFacade deptFacade;
    
    @Override
    public void create(Dept dept) throws Exception {
        deptFacade.create(dept);
    }

    @Override
    public void edit(Dept dept) throws Exception {
        deptFacade.edit(dept);
    }

    @Override
    public void remove(Dept dept) throws Exception {
        deptFacade.remove(dept);
    }

    @Override
    public Dept find(Object id) {
        return deptFacade.find(id);
    }

    @Override
    public List<Dept> findAll() {
        return deptFacade.findAll();
    }

    @Override
    public Dept findByCode(String code) {
        return deptFacade.findByCode(code);
    }
    
    @Override
    public Dept findByName(String name) {
        return deptFacade.findByName(name);
    }

    @Override
    public List<Dept> findRange(int[] range) {
        return deptFacade.findRange(range);
    }

    @Override
    public int count() {
        return deptFacade.count();
    }

}
